import request from '@/utils/request';

//参数类型
import type { loginData, loginResponseData,userInfoResponseData } from './model/login';

enum API {
    LOGIN = '/admin/acl/index/login',//登录
    INFO = "/admin/acl/index/info",//获取用户信息
    LOGOUT="/admin/acl/index/logout"
}

//登录接口
export const reqLogin = (data: loginData) => request.post<any, loginResponseData>(API.LOGIN, data);

//获取用户信息接口
export const reqUserInfo = () => request.get<any,userInfoResponseData>(API.INFO);

//退出登录接口
export const reqLogOut = ()=>request.post<any,any>(API.LOGOUT);